package oop1;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Administrator {
    String name="laoliu";
    String pass="12345liu";

    public void show(){
        System.out.println("用户名是"+name+",密码是"+pass);
    }
    public void modifyPass(){
        Scanner in=new Scanner(System.in);
        System.out.println("please input name:");
        String oldName=in.next();
        System.out.println("please input pass:");
        String oldPass=in.next();
        if(oldName.equals(name)&&oldPass.equals(pass)){
            System.out.println("输入正确！\n请输入新密码：");
            pass=in.next();
        }else{
            System.out.println("输入错误！");
        }
    }
}
